package com.ky.pro.java.fx.spring.entity;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * @ClassName AnnoKlass
 * @Description TODO
 * @Date 2021/12/4 14:09
 * @Author kevin
 **/
@Component("anno-klass-001")
public class AnnoKlass extends Klass implements InitializingBean {

    @Autowired
    @Qualifier("anno-student-001")
    transient Student annoStudent;

    @Autowired
    @Qualifier("student001")
    transient Student student001;

    public AnnoKlass() {
        super();
        this.id = 11L;
        this.name = "1-1-a";
    }

    @Override
    public void afterPropertiesSet() {
        addStudent(annoStudent);
        addStudent(student001);
    }
}
